<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<!DOCTYPE html>

<html>


<head>
    <title>MyPetStore</title>
    <link rel="StyleSheet" href="css/mypetstore.css" type="text/css" media="screen" />

</head>

<body>
<div id="Header" class="clearfix">  <!-- 加 class="clearfix" -->

    <div id="Logo">
        <div id="LogoContent">
            <a href="Catalog.action"><img src="${pageContext.request.contextPath}/images/logo-topbar.gif" alt="JPetStore Logo" /></a>
        </div>
    </div>

    <div id="Menu">
        <div id="MenuContent">
            <a href="Cart.action"><img align="middle" name="img_cart" src="${pageContext.request.contextPath}/images/cart.gif" alt="Shopping Cart" /></a>
            <img align="middle" src="${pageContext.request.contextPath}/images/separator.gif" alt="Separator" />
            <c:if test="${sessionScope.accountBean == null}">
                <a href="Account.action?signonForm=">Sign In</a>
            </c:if>
            <c:if test="${sessionScope.accountBean != null}">
                <c:if test="${!sessionScope.accountBean.authenticated}">
                    <a href="Account.action?signonForm=">Sign In</a>
                </c:if>
            </c:if>
            <img align="middle" src="${pageContext.request.contextPath}/images/separator.gif" alt="Separator" />
            <c:if test="${sessionScope.accountBean == null}">
                <a href="Account.action?signoff=">Sign Out</a>
            </c:if>
            <c:if test="${sessionScope.accountBean != null}">
                <c:if test="${!sessionScope.accountBean.authenticated}">
                    <a href="Account.action?signoff=">Sign Out</a>
                </c:if>
            </c:if>
            <img align="middle" src="${pageContext.request.contextPath}/images/separator.gif" alt="Separator" />
            <c:if test="${sessionScope.accountBean == null}">
                <a href="Account.action?editAccountForm=">My Account</a>
            </c:if>
            <c:if test="${sessionScope.accountBean != null}">
                <c:if test="${!sessionScope.accountBean.authenticated}">
                    <a href="Account.action?editAccountForm=">My Account</a>
                </c:if>
            </c:if>
            <img align="middle" src="${pageContext.request.contextPath}/images/separator.gif" alt="Separator" />
            <c:if test="${sessionScope.accountBean == null}">
                <a href="../help.html">Help</a>
            </c:if>
            <c:if test="${sessionScope.accountBean != null}">
                <c:if test="${!sessionScope.accountBean.authenticated}">
                    <a href="../help.html">Help</a>
                </c:if>
            </c:if>
        </div>
    </div>

    <div id="Search">
        <div id="SearchContent">
            <form action="searchProductForm" method="get">
                <input type="text" name="keyword" size="14" />
                <input type="submit" value="Search" />
            </form>
        </div>
    </div>

</div> <!-- Header 结束 -->

<!-- 关键修复：用 clearfix 包裹 QuickLinks 和 Content -->
<div class="clearfix">
    <div id="QuickLinks">
        <a href="categoryForm?categoryId=FISH"><img src="${pageContext.request.contextPath}/images/sm_fish.gif" alt="Fish Category" /></a>
        <img src="${pageContext.request.contextPath}/images/separator.gif" alt="Separator" />
        <a href="categoryForm?categoryId=DOGS"><img src="${pageContext.request.contextPath}/images/sm_dogs.gif" alt="Dogs Category" /></a>
        <img src="${pageContext.request.contextPath}/images/separator.gif" alt="Separator" />
        <a href="categoryForm?categoryId=REPTILES"><img src="${pageContext.request.contextPath}/images/sm_reptiles.gif" alt="Reptiles Category" /></a>
        <img src="${pageContext.request.contextPath}/images/separator.gif" alt="Separator" />
        <a href="categoryForm?categoryId=CATS"><img src="${pageContext.request.contextPath}/images/sm_cats.gif" alt="Cats Category" /></a>
        <img src="${pageContext.request.contextPath}/images/separator.gif" alt="Separator" />
        <a href="categoryForm?categoryId=BIRDS"><img src="${pageContext.request.contextPath}/images/sm_birds.gif" alt="Birds Category" /></a>
    </div>

    <div id="Content">